/* 简化版 Markdown 编辑器样式 */
.simple-md-editor {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: white;
}

.simple-md-editor:focus-within {
    border-color: #FFE45C;
    box-shadow: 0 0 0 3px rgba(255, 228, 92, 0.25);
}

.simple-md-editor .toolbar {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.simple-md-editor .toolbar-btn {
    @apply px-2 py-1 rounded text-gray-600 hover:text-gray-800 hover:bg-gray-200 transition-colors;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    min-width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.simple-md-editor .toolbar-btn:hover {
    background: #FFE45C;
    color: #222;
}

.simple-md-editor .toolbar-btn.active {
    background: #FFE45C;
    color: #222;
}

.simple-md-editor .editor-textarea {
    border: none;
    outline: none;
    resize: vertical;
    min-height: 400px;
    font-family: 'Inter', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
}

.simple-md-editor .editor-textarea:focus {
    outline: none;
}

.simple-md-editor .preview-container {
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.simple-md-editor .preview-content {
    color: #374151;
    line-height: 1.6;
}

.simple-md-editor .preview-content h1,
.simple-md-editor .preview-content h2,
.simple-md-editor .preview-content h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
    color: #111827;
}

.simple-md-editor .preview-content h1 {
    font-size: 1.875rem;
}

.simple-md-editor .preview-content h2 {
    font-size: 1.5rem;
}

.simple-md-editor .preview-content h3 {
    font-size: 1.25rem;
}

.simple-md-editor .preview-content p {
    margin-bottom: 1em;
}

.simple-md-editor .preview-content blockquote {
    border-left: 4px solid #FFE45C;
    padding-left: 1em;
    margin: 1em 0;
    color: #6b7280;
    font-style: italic;
}

.simple-md-editor .preview-content ul,
.simple-md-editor .preview-content ol {
    margin: 1em 0;
    padding-left: 2em;
}

.simple-md-editor .preview-content li {
    margin-bottom: 0.5em;
}

.simple-md-editor .preview-content code {
    background: #f3f4f6;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875em;
    color: #dc2626;
}

.simple-md-editor .preview-content a {
    color: #3b82f6;
    text-decoration: underline;
}

.simple-md-editor .preview-content a:hover {
    color: #1d4ed8;
}

.simple-md-editor .preview-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1em 0;
}

/* 全屏模式 */
.simple-md-editor.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    border-radius: 0;
    height: 100vh;
}

.simple-md-editor.fullscreen .editor-textarea {
    height: calc(100vh - 120px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .simple-md-editor .toolbar {
        padding: 0.5rem;
    }
    
    .simple-md-editor .toolbar-btn {
        min-width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .simple-md-editor .editor-textarea {
        font-size: 16px; /* 移动端防止缩放 */
        min-height: 300px;
    }
}
